/**
 * @version 2007-5-18
 * @author xalinx at gmail dot com
 */
package org.nanhill.vest.component;

/**
 * @version 2007-5-18
 * @author xalinx at gmail dot com
 * 
 */
public class Table extends AbstractComponent {

	public void build(Builder builder) {
		builder.append("<table>");
		buildInner(builder);
		builder.append("</table>");
	}

	public TableRow newRow() {
		TableRow tableRow = new TableRow();
		addChild(tableRow);
		return tableRow;
	}

	private TableHead tableHead;

	public TableHead getHead() {
		if (tableHead == null) {
			tableHead = new TableHead();
			addChild(tableHead);
		}
		return tableHead;
	}
}
